﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SpaceSquirrel.SpecialLevelStuff
{
	public class ShipTransmission : SpecialLevel
	{
		public ShipTransmission(PlayScene scene)
			: base(scene)
		{
			this.HasUpdate = true;
		}

		public override void Update()
		{
			Context ctx = this.context;
			if (!ctx.Gravity)
			{
				if (!ctx.Transmission1)
				{
					this.scene.TriggerDialog("T1", true);
					ctx.Transmission1 = true;
				}
			}
			else if (!(ctx.VolcanoA && ctx.VolcanoB && ctx.VolcanoC))
			{
				if (!ctx.Transmission2)
				{
					this.scene.TriggerDialog("T2", true);
					ctx.Transmission2 = true;
				}
			}
			else if (!(ctx.BalloonA && ctx.BalloonB && ctx.BalloonC && ctx.BalloonD))
			{
				if (!ctx.Transmission3)
				{
					this.scene.TriggerDialog("T3", true);
					ctx.Transmission3 = true;
				}
			}
			else
			{
				if (!ctx.Transmission4)
				{
					this.scene.TriggerDialog("T4", true);
					ctx.Transmission4 = true;
				}
			}
		}
	}
}
